home *** CD-ROM | disk | FTP | other *** search
Wrap
ddddmmmmGGGG777722228888EEEEnnnnccccooooddddeeee((((3333ddddmmmm)))) ddddmmmmGGGG777722228888EEEEnnnnccccooooddddeeee((((3333ddddmmmm)))) NNNNAAAAMMMMEEEE dmG728Encode - implements the ITU (International Telecommunication Union) Recommendation G.728 compression (LD-CELP). SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS ####iiiinnnncccclllluuuuddddeeee <<<<ddddmmmmeeeeddddiiiiaaaa////ddddmmmm____aaaauuuuddddiiiioooouuuuttttiiiillll....hhhh>>>> DDDDMMMMssssttttaaaattttuuuussss ddddmmmmGGGG777722228888EEEEnnnnccccooooddddeeee((((DDDDMMMMGGGG777722228888eeeennnnccccooooddddeeeerrrr hhhhaaaannnnddddlllleeee,,,, sssshhhhoooorrrrtttt ****iiiibbbbuuuuffff,,,, uuuunnnnssssiiiiggggnnnneeeedddd cccchhhhaaaarrrr ****oooobbbbuuuuffff,,,, iiiinnnntttt nnnnssssaaaammmmpppplllleeeessss)))) PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRR _h_a_n_d_l_e DDDDMMMMGGGG777722228888eeeennnnccccooooddddeeeerrrr structure, created by ddddmmmmGGGG777722228888EEEEnnnnccccooooddddeeeerrrrCCCCrrrreeeeaaaatttteeee((((3333ddddmmmm)))), specifies the signal processing parameters. _i_b_u_f pointer to input sample data buffer. The data format is short (16-bit). The samples are assumed to be two's complement. The sampling rate must be 8 kHz. _o_b_u_f pointer to output data buffer. The data format is unsigned char (8-bit). This bitstrem buffer must consist of a multiple of 10 bytes. _n_s_a_m_p_l_e_s number of samples in the input buffer to be processed. the value of nsamples passed to the G.728 encode/decode routines must always be a multiple of 40. RRRREEEETTTTUUUURRRRNNNNEEEEDDDD VVVVAAAALLLLUUUUEEEE Returns DDDDMMMM____FFFFAAAAIIIILLLLUUUURRRREEEE or DDDDMMMM____SSSSUUUUCCCCCCCCEEEESSSSSSSS. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN ddddmmmmGGGG777722228888EEEEnnnnccccooooddddeeee((((3333ddddmmmm)))) implements the ITU Recommendation G.728 compression. The uncompressed data sampling rate is 8000 Hz. And the compressed bitrate is 16000 bits/s. ITU Recommendation G.728 compression also uses a linear prediction scheme. This means that the compressed bits, which carrying compressed information, are interrelated or interdependent. If a application calls aaaaffffSSSSeeeeeeeekkkkFFFFrrrraaaammmmeeee((((3333ddddmmmm)))) to an offset into the compressed bit stream file and then starts reading bits in the middle of the bit stream and decompress them with ddddmmmmGGGG777722228888DDDDeeeeccccooooddddeeee((((3333ddddmmmm)))), the interdependency of the bits at the cutting point is lost. The application will initially get back data with a lower amplitude than if he had read the same data back during a complete pass over the file from the beginning. PPPPaaaaggggeeee 1111 ddddmmmmGGGG777722228888EEEEnnnnccccooooddddeeee((((3333ddddmmmm)))) ddddmmmmGGGG777722228888EEEEnnnnccccooooddddeeee((((3333ddddmmmm)))) There is no way to exactly recreate the decoded data in the middle of the bit stream file without going all the way back to the beginning. However, with a "preroll" value to read ahead a portion of the compressed file, application can compensate for the amplitude problem. We recommend 2 second "preroll". NNNNOOOOTTTTEEEE G.728 algorithm was developed for sampling rate of 8 kHz. SSSSEEEEEEEE AAAALLLLSSSSOOOO dmG728EncoderCreate(3dm), dmG728EncoderDestroy(3dm), dmG728Decode(3dm), ITU Recommendation G.728. PPPPaaaaggggeeee 2222